package com.aidex.biz.service.impl;

import com.aidex.biz.domain.JinjianFiles;
import com.aidex.biz.mapper.JinjianFilesMapper;
import com.aidex.biz.service.JinjianFilesService;
import com.aidex.common.annotation.DataScope;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.common.utils.NumberUtils;
import com.github.pagehelper.PageInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 进件资料Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2025-07-18
 */
@Service
@Transactional(readOnly = true)
public class JinjianFilesServiceImpl extends BaseServiceImpl<JinjianFilesMapper, JinjianFiles> implements JinjianFilesService
{
    private static final Logger log = LoggerFactory.getLogger(JinjianFilesServiceImpl.class);

    /**
     * 获取单条数据
     * @param jinjianFiles 进件资料
     * @return 进件资料
     */
    @Override
    public JinjianFiles get(JinjianFiles jinjianFiles)
    {
        JinjianFiles dto = super.get(jinjianFiles);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 进件资料id
     * @return 进件资料
     */
    @Override
    public JinjianFiles get(String id)
    {
        JinjianFiles dto = super.get(id);
        return dto;
    }


    /**
     * 查询进件资料列表
     * @param jinjianFiles 进件资料
     * @return 进件资料
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<JinjianFiles> findList(JinjianFiles jinjianFiles)
    {
        return super.findList(jinjianFiles);
    }

    /**
     * 分页查询进件资料列表
     * @param jinjianFiles 进件资料
     * @return 进件资料
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<JinjianFiles> findPage(JinjianFiles jinjianFiles)
    {
        return super.findPage(jinjianFiles);
    }

    /**
     * 保存进件资料
     * @param jinjianFiles
     * @return 结果
     */
    @Override
    public boolean save(JinjianFiles jinjianFiles)
    {
        return super.save(jinjianFiles);
    }


    /**
     * 删除进件资料信息
     * @param jinjianFiles
     * @return 结果
     */
    @Override
    public boolean remove(JinjianFiles jinjianFiles)
    {
        return super.remove(jinjianFiles);
    }

    /**
     * 批量删除进件资料
     * @param ids 需要删除的进件资料ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteJinjianFilesByIds(String[] ids)
    {
        return mapper.deleteJinjianFilesByIds(ids);
    }

    /**
     * 获取最大编号
     * @param jinjianFiles 进件资料
     * @return 结果
     */
    @Override
    public int findMaxSort(JinjianFiles jinjianFiles)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(jinjianFiles));
    }
}
